package com.sailing.face.config;

import com.sailing.face.handle.FaceInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @author fox
 */
@Configuration
public class FaceWebAppConfigurer extends WebMvcConfigurerAdapter{
    /**
     *
     * @param registry
     * 添加对face路径下的请求进行拦截
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new FaceInterceptor()).addPathPatterns("/face/**");
        super.addInterceptors(registry);
    }
}
